package graphics.gui;


import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;

public class MainWindow {

	private int width;
	
	private int height;
	
	private boolean fullscreen;
	
	public MainWindow(int width, int height, boolean fullscreen){
		this.width = width;
		this.height = height;
		this.fullscreen = fullscreen;
	}
	
	public void synch(int rate) {
		Display.sync(rate);
	}

	public void update() {
		Display.update();
	}
	
	public void setup() throws Exception {
		Display.setDisplayMode(new DisplayMode(width, height));
		Display.setFullscreen(fullscreen);
		Display.create();
	}
	
	public void shutdown() {
		Display.destroy();
	}
	
	public boolean exitRequested() {
		return Display.isCloseRequested();
	}
}
